<?php

namespace app\common\constant\driving;

/**
 * 公共常量类
 */
class CommonConstant
{

    // 默认头像
    const AVATAR = '/assets/img/avatar.png';

    // 是否状态:0=否,1=是
    const IS_WHO_0 = '0';
    const IS_WHO_1 = '1';

    public static function get_is_who_list()
    {
        return [
            self::IS_WHO_0 => '否',
            self::IS_WHO_1 => '是',
        ];
    }

    // 状态:1=正常,0=下架
    const STATUS_1 = '1';
    const STATUS_0 = '0';

    public static function get_status_list()
    {
        return [
            self::STATUS_0 => '下架',
            self::STATUS_1 => '正常',
        ];
    }

    // 审核状态:1=待审核,2=审核通过,3=审核不通过
    const AUDIT_STATUS_1 = '1';
    const AUDIT_STATUS_2 = '2';
    const AUDIT_STATUS_3 = '3';

    public static function get_audit_status_list()
    {
        return [
            self::AUDIT_STATUS_1 => '待审核',
            self::AUDIT_STATUS_2 => '审核通过',
            self::AUDIT_STATUS_3 => '审核驳回',
        ];
    }

    // 支付类型:wechat=微信支付,alipay=支付宝支付,bank=三方渠道
    const PAYTYPE_WECHAT = 'wechat';
    const PAYTYPE_ALIPAY = 'alipay';
    const PAYTYPE_BANK = 'bank';

    public static function get_paytype_list()
    {
        return [
            self::PAYTYPE_WECHAT => '微信支付',
            self::PAYTYPE_ALIPAY => '支付宝支付',
        ];
    }

    // 支付方法:app=APP支付,scan=扫码支付,miniapp=小程序支付
    const APPTYPE_APP = 'app';
    const APPTYPE_SCAN = 'scan';
    const APPTYPE_MINI = 'miniapp';

    public static function get_apptype_list()
    {
        return [
            self::APPTYPE_APP => 'APP支付',
            self::APPTYPE_SCAN => '扫码支付',
            self::APPTYPE_MINI => '小程序支付',
        ];
    }

    // 充值订单状态:created=未支付,paid=已支付,expired=已失效
    const STATUS_CREATED = 'created';
    const STATUS_PAID = 'paid';
    const STATUS_EXPIRED = 'expired';

    public static function get_order_status_list()
    {
        return [
            self::STATUS_CREATED => '未支付',
            self::STATUS_PAID => '已支付',
            self::STATUS_EXPIRED => '已失效',
        ];
    }

    // 提现状态::created=申请中,successed=成功,rejected=已拒绝
    const W_STATUS_CREATED = 'created';
    const W_STATUS_SUCCESSED = 'successed';
    const W_STATUS_REJECTED = 'rejected';

    public static function get_withdrawal_status_list()
    {
        return [
            self::W_STATUS_CREATED => '申请中',
            self::W_STATUS_SUCCESSED => '成功',
            self::W_STATUS_REJECTED => '已拒绝',
        ];
    }

    // 退款状态:1=已退款,0=未退款
    const REFUND_STATUS_1 = '1';
    const REFUND_STATUS_0 = '0';

    public static function get_refund_status_list()
    {
        return [
            self::REFUND_STATUS_0 => '未退款',
            self::REFUND_STATUS_1 => '已退款',
        ];
    }

    // 过期状态:1=已过期,0=未过期
    const EXPIRED_STATUS_1 = '1';
    const EXPIRED_STATUS_0 = '0';

    public static function get_expired_status_list()
    {
        return [
            self::EXPIRED_STATUS_0 => '未过期',
            self::EXPIRED_STATUS_1 => '已过期',
        ];
    }
}
